// 求斐波那契数列的第 n 项

#include <stdio.h>

long fibonacci(long n);

int main(int argc, char const *argv[])
{
    long n, fibo_n;
    scanf("%ld", &n);
    fibo_n = fibonacci(n);
    printf("%ld\n", fibo_n);
    
    return 0;
}

long fibonacci(long n)
{
    long ret;
    if (n == 1)
    {
        ret = 0;
    }
    else if (n == 2)
    {
        ret = 1;
    }
    else
    {
        ret = fibonacci(n - 2) + fibonacci(n - 1);
    }

    return ret;
}